package com.example.springdemo.service;

import java.util.List;

import com.example.springdemo.entity.Orderdetail;
import com.example.springdemo.mapper.OrderdetailMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
 * orderdetailService业务层处理
 * 
 * @author ruoyi
 * @date 2025-05-07
 */
@Service
public class OrderdetailServiceImpl implements IOrderdetailService 
{
    @Autowired
    private OrderdetailMapper orderdetailMapper;

    /**
     * 查询orderdetail
     * 
     * @param detailid orderdetail主键
     * @return orderdetail
     */
    @Override
    public Orderdetail selectOrderdetailByDetailid(Long detailid)
    {
        return orderdetailMapper.selectOrderdetailByDetailid(detailid);
    }

    /**
     * 查询orderdetail列表
     * 
     * @param orderdetail orderdetail
     * @return orderdetail
     */
    @Override
    public List<Orderdetail> selectOrderdetailList(Orderdetail orderdetail)
    {
        return orderdetailMapper.selectOrderdetailList(orderdetail);
    }

    /**
     * 新增orderdetail
     * 
     * @param orderdetail orderdetail
     * @return 结果
     */
    @Override
    public int insertOrderdetail(Orderdetail orderdetail)
    {
        return orderdetailMapper.insertOrderdetail(orderdetail);
    }

    /**
     * 修改orderdetail
     * 
     * @param orderdetail orderdetail
     * @return 结果
     */
    @Override
    public int updateOrderdetail(Orderdetail orderdetail)
    {
        return orderdetailMapper.updateOrderdetail(orderdetail);
    }

    /**
     * 批量删除orderdetail
     * 
     * @param detailids 需要删除的orderdetail主键
     * @return 结果
     */
    @Override
    public int deleteOrderdetailByDetailids(Long[] detailids)
    {
        return orderdetailMapper.deleteOrderdetailByDetailids(detailids);
    }

    /**
     * 删除orderdetail信息
     * 
     * @param detailid orderdetail主键
     * @return 结果
     */
    @Override
    public int deleteOrderdetailByDetailid(Long detailid)
    {
        return orderdetailMapper.deleteOrderdetailByDetailid(detailid);
    }
}
